<h2 class="widget-title ribbon"><span>Most Read</span></h2>

						<div class="entries row">
							<?php
							$select_news = $conn->query("SELECT * FROM `news` ORDER BY viewed DESC LIMIT 0,5");
							while($row_news = $select_news->fetch()){
							?>
							<article class="type-post style-media-list media col-sm-6 col-md-12">

								<!-- to disable lazy loading, remove data-src and data-src-retina -->
								<img src="/author/images/<?php echo $row_news['img_name']; ?>" width="230" height="230" class="media-object pull-left" alt="">

								<!--fallback for no javascript browsers-->
								<noscript>
									<img src="/author/images/<?php echo $row_news['img_name']; ?>" alt="">
								</noscript>

								<div class="media-body">
									<h3  class="entry-title">
										<a href="/post/<?php echo $row_news['id']; ?>" rel="bookmark"><?php echo $row_news['title']; ?></a>
									</h3>
									<div class="entry-meta">
										<span class="entry-date"><a href="#"><time datetime="2013-07-04T23:26:34+00:00"><?php echo @date("F jS Y",strtotime($row_news['pub_date'])); ?></time></a></span>
										<?php 
											$select_news_cat = $conn->query("SELECT * FROM news_categories WHERE id = '".$row_news['category_id']."'");
											$row_news_cat = $select_news_cat->fetch();
										?>
										<span class="category">in <a href="http://tech.af/cats/<?php echo $row_news_cat['id']; ?>"><?php echo $row_news_cat['category_name']; ?></a></span>
									</div>
								</div>

							</article>

							<?php } ?>

						</div>